package org.datascooter.test.example;

import java.util.List;
import java.util.Map;
import java.util.Set;

import javax.persistence.Transient;

import org.datascooter.utils.ReferenceInvoker;

public class NaturalUser extends User {

	private static final long serialVersionUID = 6372446336067531769L;
	String firstName;
	String lastName;
	private Location location;

	public NaturalUser() {
	}

	public NaturalUser(String login, String password, String firstName, String lastName) {
		super(login, password);
		this.firstName = firstName;
		this.lastName = lastName;
	}

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	@Transient
	public List<Contract> getWinContractsList() {
		return (List) ReferenceInvoker.invokeCollection(this, "getWinContractsList");
	}

	@Transient
	public Map<String, Contract> getWinContractsMap() {
		return ReferenceInvoker.invokeMap(this, "getWinContractsMap");
	}

	@Transient
	public Set<Contract> getWinContractsSet() {
		return (Set) ReferenceInvoker.invokeCollection(this, "getWinContractsSet");
	}

	public Location getLocation() {
		return location;
	}

	public void setLocation(Location location) {
		this.location = location;
	}

	@Override
	public String toString() {
		return "NaturalUser [login=" + getLogin() + ", lastName=" + lastName + ", location=" + location + "]";
	}
}
